<?php

namespace App\Http\Controllers;

use App\Library\Requests\Base\BasePageRequest;
use App\Library\Service\StaffService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;


class StaffController  extends BaseController
{
    /**
     * @param StaffService $service
     */
    public function __construct(StaffService $service)
    {
        $this->service = $service;
    }

    public function add(Request $request): JsonResponse
    {
        return $this->service->add($request);
    }

    public function del(Request $request): JsonResponse
    {
        return $this->service->del($request);
    }

    /**
     *
     * Author: zlf
     * Created at 2024/11/26 20:22
     * @param BasePageRequest $request
     * @return JsonResponse|array
     */
    public function staffList(BasePageRequest $request): JsonResponse|array
    {
        return $this->service->staffList($request);
    }
}
